Skip to content

Give each audio plugin instrument a volume and a mute - #5

Merged
hsshss merged 2 commits into
mainfrom
instrument-volume
Oct 14, 2026
Merged

hsshss merged 2 commits into
mainfrom
instrument-volume

Conversation

@hsshss

@hsshss hsshss commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Gives each audio plugin instrument a volume and a mute, and the master volume a mute, with Brack's new instrument volumes; makes the volume sliders easier to set; and opens every window again that was open at the last close.

Volume and mute

Brack (hsshss/brack@0a7cbd2, C API version 3) gives each instrument a gain and a mute after its effects, and the master a mute. Both apply without waiting for Brack's thread and ramp, and a muted instrument goes on taking MIDI and playing, so that it is heard from where the song is when unmuted.

  • Each instrument's card in Settings > Audio Plugins has a speaker that mutes it and a volume slider, between its MIDI lamp and its meter, which now reads after the volume. The master volume above the seek bar gets a speaker for the master mute.
  • Both are kept in the rack's session. Setting them changes the rack's contents in place, without the save and refresh other changes make, so a slider dragged while a plugin loads does not stall the window (BrackRack.SetGain, SetMute, MasterMute).
  • Decibels holds the range and conversions both sliders share.

The sliders

  • While a volume slider is dragged, its tooltip shows the value (DragTip); with Shift held it moves a tenth as far (FineDrag). Both take the pointer's input around the tooltip service and the slider, which would close the tip or put the value under the pointer.
  • The sliders' track sat 2 px above the middle: the theme's rows around it did not add up to the slider's height.
  • The tooltips are shorter, without "(audio plugins only)" and "(after the effects)".

Meters

  • A click a little off a meter's clip lamp clears it: the lamp sat at the button's right edge.
  • A click on any meter puts out every clip lamp in the window.

Windows

Every window the main window opens (settings, port maps, audio plugins, and the panes as before) opens again at startup if it was open when the player last closed.

Brack package

CI and releases take Brack from nuget.org, at BrackVersion 1.2.0, which has no instrument volumes, so the build fails there until a Brack package with them is published and BrackVersion goes up to it.

Testing

  • dotnet test, 956 tests, with Brack beside: the volume and mute reach Brack and are kept, the master mute is kept, a drag keeps its tooltip open and moves a tenth as far with Shift without jumping, and a click on one meter clears the others.
  • The audio plugins window and the sliders were rendered offscreen with the app's theme; the windows reopening was checked by starting the player with all of them marked open.

The lamp sat at the meter button's right edge, so a click on its right
side, or one that moved a point while the button was down, fell outside
the button and left the lamp lit. The button is padded around the lamp,
and what follows each meter stands as far from it as before.
Each instrument's card in the audio plugins window has a speaker that
mutes it and a volume slider, between its MIDI lamp and its meter, which
now reads after the volume. They set Brack's gain and mute for the
instrument, kept in the rack's session. They do not wait for Brack: the
rack's contents are changed in place, without the save and refresh other
changes make, so that a slider dragged while a plugin loads does not
stall the window. The master volume above the seek bar gets a speaker
too, for Brack's master mute.

- While a volume slider is dragged, its tooltip shows the value
  (DragTip), and with Shift held it moves a tenth as far (FineDrag).
  Both take the pointer's input around the tooltip service and the
  slider, which would close the tip or put the value under the pointer.
- The sliders' track sat 2 px high: the theme's rows around it did not
  add up to the slider's height.
- A click on any meter puts out every clip lamp in the window.
- Decibels holds the volume sliders' range and conversions, shared by
  the master and the instruments.
- The tests' application has the Fluent theme, for the tests that drag
  controls.
- Every window the main window opens (settings, port maps, audio plugins
  and the panes) opens again at startup if it was open when the player
  last closed, not only the panes.

This needs Brack 2.0.0, with the instruments' volumes (its C API version 3),
which BrackVersion now names.
@hsshss
hsshss force-pushed the instrument-volume branch from 386f675 to 6865a07 Compare October 14, 2026 12:28
@hsshss
hsshss merged commit 75ea892 into main Oct 14, 2026
6 checks passed
@hsshss
hsshss deleted the instrument-volume branch October 14, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant